package org.example.JVM.ByteCode.Handler;

import org.example.JVM.ByteCode.Type.ClassFile;
import org.example.JVM.ByteCode.Type.U2;

import java.nio.ByteBuffer;

/**
 * @description:
 * @author: farprt
 * @create: 2022-11-13 16:50
 **/
public class AccessFlagsHandler implements BaseByteCodeHandler {
    @Override
    public int order() {
        return 3;
    }

    @Override
    public void read(ByteBuffer codeBuf, ClassFile classFile) throws Exception {
        classFile.setAccess_flags(new U2(codeBuf.get(), codeBuf.get()));
    }
}